/* WebRTC 视频通话系统样式 */

/* 基础样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* 连接状态样式 */
.connection-connected {
    color: #28a745;
    font-weight: bold;
}

.connection-disconnected {
    color: #dc3545;
    font-weight: bold;
}

.connection-reconnecting {
    color: #ffc107;
    font-weight: bold;
}

/* 房间列表样式 */
.room-item {
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    background-color: white;
    transition: all 0.3s ease;
}

.room-item.available {
    border-left: 4px solid #28a745;
}

.room-item.available:hover {
    background-color: #e8f5e9;
    transform: translateX(2px);
    cursor: pointer;
}

.room-item.full {
    border-left: 4px solid #dc3545;
    background-color: #f8f9fa;
    opacity: 0.7;
}

/* 用户列表样式 */
.user-item {
    padding: 8px;
    margin: 5px 0;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    background-color: white;
    transition: background-color 0.3s ease;
}

.user-item:hover {
    background-color: #f1f3f4;
}

.user-name {
    font-weight: 500;
    color: #495057;
}

/* 视频容器样式 */
video {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#localVideo {
    border: 2px solid #007bff;
}

#remoteVideo {
    border: 2px solid #28a745;
}

/* 日志消息样式 */
#logMessages {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    line-height: 1.4;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 10px;
    height: 200px;
    overflow-y: auto;
}

.log-message {
    margin-bottom: 2px;
    padding: 2px 4px;
    border-radius: 3px;
}

.log-success {
    color: #155724;
    background-color: #d4edda;
}

.log-error {
    color: #721c24;
    background-color: #f8d7da;
}

.log-warning {
    color: #856404;
    background-color: #fff3cd;
}

.log-info {
    color: #0c5460;
    background-color: #d1ecf1;
}

.log-debug {
    color: #383d41;
    background-color: #e2e3e5;
}

/* 按钮样式增强 */
.btn-call {
    transition: all 0.3s ease;
}

.btn-call:hover {
    transform: scale(1.05);
}

/* 卡片样式增强 */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* 状态指示器 */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-online {
    background-color: #28a745;
}

.status-offline {
    background-color: #dc3545;
}

.status-connecting {
    background-color: #ffc107;
    animation: pulse 1.5s infinite;
}

/* 动画效果 */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container-fluid {
        padding: 10px;
    }
    
    .card {
        margin-bottom: 15px;
    }
    
    .btn-group .btn {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    #logMessages {
        height: 150px;
        font-size: 11px;
    }
}

/* 模态框增强 */
.modal-content {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
    border-radius: 10px 10px 0 0;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
    border-radius: 0 0 10px 10px;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 通话控制按钮 */
.call-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.call-controls .btn {
    margin: 0 5px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* 工具提示 */
.tooltip-inner {
    background-color: #333;
    color: white;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
}

/* 徽章样式 */
.badge {
    font-size: 0.75em;
    padding: 0.35em 0.65em;
}

/* 表单增强 */
.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 滚动条样式 */
#logMessages::-webkit-scrollbar {
    width: 6px;
}

#logMessages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#logMessages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#logMessages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 网格布局增强 */
.video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}

/* 连接质量指示器 */
.connection-quality {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.quality-excellent { background-color: #28a745; }
.quality-good { background-color: #17a2b8; }
.quality-fair { background-color: #ffc107; }
.quality-poor { background-color: #dc3545; } 